package com.blb.service.impl;

import com.blb.entity.Categories;
import com.blb.mapper.CategoriesMapper;
import com.blb.service.ICategoriesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author HuaHao
 * @since 2019-11-20
 */
@Service
public class CategoriesServiceImpl extends ServiceImpl<CategoriesMapper, Categories> implements ICategoriesService {
    @Resource
    private CategoriesMapper categoriesMapper;
    @Override
    public List<Categories> getCategories() {
        List<Categories> categories = categoriesMapper.getCategories();
        return categories;
    }

    @Override
    public String categoriesName(String enterpriseid) {
        return categoriesMapper.categoriesName(enterpriseid);
    }

    @Override
    public String findCategoriesId(String name) {
        return categoriesMapper.findCategoriesId(name);
    }

    @Override
    public void addCategories(Categories categories) {
        categoriesMapper.addCategories(categories);
    }

    @Override
    public void deleteCategories(String id) {
        categoriesMapper.deleteCategories(id);
    }

    @Override
    public List<String> findId(String id) {
        return categoriesMapper.findId(id);
    }

    @Override
    public void updateCategories(Categories categories) {
        categoriesMapper.updateCategories(categories);
    }

    @Override
    public List<Categories> getAllNode(String nodeId, String companyId) {
        return categoriesMapper.getAllNode(nodeId, companyId);
    }
}
